[#ftl]
[#assign s=JspTaglibs["/WEB-INF/struts-tags.tld"] /]
[#import 'head.ftl' as head]
[#assign title='网络硬盘, 改变生活!' /]
[#assign h1=basePath + 'bootstrap/css/bootstrap.min.css' /]
[#assign h2=basePath + 'css/index.css' /]
[#assign h3=basePath + 'css/uploadify.css' /]
[#assign h4=basePath + 'css/filesystem.css' /]
[#assign linkHrefs=[h1, h2, h3, h4] /]
[@head.printHead title linkHrefs /]
</head>
<body>
	<div class="container-fluid">
		<div class="row-fluid">
			<div class="navbar navbar-fixed-top">
				<div class="navbar-inner">
					<a class="brand">网络硬盘</a>
					<div style="float: right;">
						<ul id="menu">
							<li><a id="sysInfo"><i class="icon-info-sign"></i>查看系统信息</a></li>
							[#if Session.logined?exists]
							<li><a id="sysMng"><i class="icon-wrench"></i>系统管理</a></li>
							<li><a id="createGroup"><img alt="" src="${basePath}img/ico-group.png">新建组</a></li>
							<li><a id="createUser"><i class="icon-user"></i>添加员工</a></li>
							[/#if]
							<li><a id="capacity" data-toggle="tooltip"><i class="icon-hdd"></i>容量</a></li>
							<li><a id="loginUser"><i class="icon-user"></i>${Session.user.loginName}</a></li>
							<li><a id="quit"><i class="icon-remove-sign"></i>安全退出</a></li>
						</ul>
					</div>
				</div>
			</div>
			<div style="padding-top: 40px;"></div>
			<div class="span12" id="content" style="margin: 0px;">
				<div class="row-fluid"
					style="background-color: #fafafa; border: 1px solid #eae8e7; padding: 5px;">
					<div class="span12">
						<ul id="contentHead">
							<li>
								<ul class="submenu">
									<li><a id="createFolder" class="btn btn-small" data-currentPath="/"> <i class="icon-folder-open"></i>新建文件夹
									</a></li>
									<li><a id="upload" class="btn btn-small"> <i class="icon-upload"></i>上传文件
									</a></li>
									<li><a id="download" class="btn btn-small"> <i class="icon-download"></i>下载文件
									</a></li>
									<li><a id="share" class="btn btn-small"> <i class="icon-share"></i>分享文件
									</a></li>
									<li><a id="delete" class="btn btn-small"> <i class="icon-remove"></i>删除文件
									</a></li>
									<li><a id="trashFolder" class="btn btn-small"> <i class="icon-trash"></i>回收站
									</a></li>
								</ul>
							</li>
							<li class="right">
								<div class="input-append" style="margin: 0px; line-height: 0px;">
									<input class="input-small" id="appendedInput" type="text"
										placeholder="搜索文件"> <span class="add-on"><i
										class="icon-search"></i>搜索</span>
								</div>
							</li>
						</ul>
					</div>
					<div id="context" class="sapn12">
						<a data-currentDir="${currentDir!''}" data-parentDir="${parentDir!''}">根目录</a>
					</div>
				</div>
				<div class="row-fluid">
					<input id="path" type="hidden" data-currentDir="${currentDir!''}" data-parentDir="${parentDir!''}" data-store-dir="${storeDir!''}" /> 
					<div class="span12" id="contentBody">
					[#list lf as fs]
						[#if fs.type == 1][#--文件夹--]
						<ul class="dir">
							<li data-fileName="${fs.fileName!''}"  data-fileSize="${fs.fileSize?c!''}" data-id="${fs.id!''}" 
								data-uploadDate="${fs.uploadDate?c!''}"  data-lastModifyDate="${fs.lastModifyDate?c!''}" data-ownerName="${fs.ownerName!''}" data-parentDir="${fs.parentDir!''}"
								data-ownerId="${fs.ownerId!''}" data-remark="${fs.remark!''}" data-shared="${fs.shared!''}" data-storeName="${fs.storeName!''}"> 
								<img class="fileLogo" src="fileIcoAction.htm?icoName=dir"  /> 
							</li>
							<li>
								<a class="fileName">${fs.fileName!''}</a>
							</li>
						</ul>
						[#else][#--文件--]
						<ul class="file">
							<li data-fileName="${fs.fileName!''}"  data-fileSize="${fs.fileSize?c!''}" data-id="${fs.id!''}" 
								data-uploadDate="${fs.uploadDate?c!''}"  data-lastModifyDate="${fs.lastModifyDate?c!''}" data-ownerName="${fs.ownerName!''}" data-parentDir="${fs.parentDir!''}"
								data-ownerId="${fs.ownerId!''}" data-remark="${fs.remark!''}" data-shared="${fs.shared!''}" data-storeName="${fs.storeName!''}"> 
								<img class="fileLogo" /> 
							</li>
							<li>
								<a class="fileName">${fs.fileName!''}</a>
							</li>
						</ul>
						[/#if]
					[/#list]
					</div>
				</div>
			</div><!--/span10  -->

		</div><!--/row-fluid  -->
	</div><!--/container-fluid  -->
	
	<br />
	<br />
	<br />
	<br />
	
	<div id="messages"></div>
	
	<!-- Modal -->
	<div id="uploadModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	  <div class="modal-header">
	    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
	    <h3 id="myModalLabel">上传文件</h3>
	    <p class="text-warning">最多同时上传3个文件,单个文件大小不超过200M</p>
	  </div>
	  <div class="modal-body">
	    <p>
	    	<!-- 上传按钮 -->
		    <input type="file" id="upload-button" />
			<div id="some_file_queue"></div>
	    </p>
	  </div>
	  <div class="modal-footer">
	    <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
	    <button class="btn btn-primary" id="startUpload">开始上传!</button>
	  </div>
	</div>
	
	[#assign s1=basePath + 'js/jquery-1.9.1.js' /]
	[#assign s2=basePath + 'js/jquery-ui-1.10.2.custom.js' /]
	[#assign s3=basePath + 'bootstrap/js/bootstrap.js' /]
	[#assign s4=basePath + 'js/jquery.uploadify.js' /]
	[#assign s5=basePath + 'js/util.js' /]
	[#assign s6=basePath + 'js/filesystem.js' /]
	[#assign scripts=[s1, s2, s3, s4, s5, s6] /]
	[#import "tail.ftl" as tail]
	[@tail.printTail scripts /]
